<?php

//Magic!

require('../Magic/magic.php');
$userSys = new UserSystem();

if($_GET['log']=='out'){
	$userSys->logout();
	
}else{

	//lazy, assume its post
	$userSys->login($_POST['name'],$_POST['pass']);


}
header("location: index.php");